package com.xiongwei.mediator;

/**
 * @author XiongWei
 * @date 2024/2/1
 */
public class Client {

    public static void main(String[] args) {
        ConcreteMediator concreteMediator = new ConcreteMediator();

        Alarm alarm = new Alarm(concreteMediator, "alarm");
        CoffeeMachine coffeeMachine = new CoffeeMachine(concreteMediator, "coffeeMachine");

        //闹钟响了
        alarm.sendAlarm(0);
        coffeeMachine.finishCoffee();
    }
}
